// f1.C -- Written on Jun 1st, 2024 by SUN Yazhou
// A comprehensive check on F1 detectors
void f1_raw(){
  TFile *f = new TFile(getenv("TMP1"));
  TTree *etf = (TTree *)f->Get("etf");

  TCanvas *c = new TCanvas("c", "Plastics @ F1 extracted from ETFAnaUserTask",
    1680, 1050);
  c->Divide(2, 2);

  c->cd(1); etf->Draw("t0arr.x()>>h1(52, -52, 52)", "t0arr.firedU()");
  c->cd(2); etf->Draw("t0arr.x()>>h2(52, -52, 52)", "t0arr.firedD()");
  c->cd(3); etf->Draw("t0arr.x()>>h3(52, -52, 52)", "t0arr.fired()==4");
  c->cd(4); etf->Draw("t0arr.fired()>>h4(7, -1.5, 5.5)");

  c->Print("f1_raw.pdf");
} // end f1_raw
